diff --git a/puppetboard/static/css/puppetboard.css b/puppetboard/static/css/puppetboard.css index 46d002f..a00cbd0 100644 --- a/puppetboard/static/css/puppetboard.css +++ b/puppetboard/static/css/puppetboard.css @@ -1,104 +1,57 @@ body { - padding-top: 60px; -} -th.headerSortUp { - position: relative -} -th.headerSortDown { - position: relative -} -th.header { - position: relative -} -th.header:after { - content: "\f0dc"; - font-family: FontAwesome; - font-style: normal; - font-weight: normal; - text-decoration: inherit; - color: #000; - font-size: 18px; - padding-right: 0.5em; - float:right; -} -th.headerSortUp:after { - content: "\f0de"; - font-family: FontAwesome; - font-style: normal; - font-weight: normal; - text-decoration: inherit; - color: #000; - font-size: 18px; - padding-right: 0.5em; - float:right; -} -th.headerSortDown:after { - content: "\f0dd"; - font-family: FontAwesome; - font-style: normal; - font-weight: normal; - text-decoration: inherit; - color: #000; - font-size: 18px; - padding-right: 0.5em; - float:right; -} -.stat { - margin-bottom: 40px; -} -.navbar .brand:hover { - color: #fff; -} -.table tbody tr.error>td { - background-color: #f2dede; -} -h1.error { - color: rgb(223, 46, 27); -} -h1.success { - color: #18BC9C; -} -h1.noop { - color:#aaa; -} -tr.event { - cursor: pointer; -} -td.message { - padding: 0; - border: 0; - background-color: #FFFFE9; -} -div[id^='message-event'] { - display: none; - padding: 4px 15px 4px 15px; -} -.label-count { - width:25px; - text-align:center; -} -.label-time { - width:73px; - text-align:center; -} -.label-status { - width:100px; - text-align:center; -} -.label-nothing { - background-color:#ddd; - color:#ddd; -} -.label.label-failed { - background-color: rgb(231, 76, 60); -} -.label.label-changed { - background-color: rgb(24, 188, 156); -} -.label.label-unreported { - background-color: rgb(231, 76, 60); - background-color: rgb(129, 145, 146); -} -.btn-lastreport { - width:100px; + margin: 0; + font-family: "Open Sans", sans-serif; +} + +a { + color: #564F8A; + text-decoration: none; +} + +h1.ui.header.no-margin-bottom { + margin-bottom: 0; +} + +.tablesorter-header-inner { + float: left; +} + +th.tablesorter-headerAsc::after { + content: '\25b4' !important; + float: right; +} + +th.tablesorter-headerDesc::after { + content: '\25be' !important; + float: right; +} + +.ui.grid.padding-bottom { + padding-bottom: 40px !important; +} + +.status { + width: 47%; + text-align: center; + display: block; +} +.count { + width: 21%; + text-align: center; + display: block; +} + +.no-margin-top { + margin-top: -35px !important; +} + +.absolute { + position: fixed; + bottom: 0; + width: 100%; + background: #E8E8E8; +} + +.absolute div { + padding: 1em; } diff --git a/puppetboard/static/js/tablesort.min.js b/puppetboard/static/js/tablesort.min.js new file mode 100644 index 0000000..ab17511 --- /dev/null +++ b/puppetboard/static/js/tablesort.min.js @@ -0,0 +1,9 @@ +/* + A simple, lightweight jQuery plugin for creating sortable tables. + https://github.com/kylefox/jquery-tablesort + Version 0.0.2 +*/ +$(function(){var a=window.jQuery;a.tablesort=function(d,c){var e=this;this.$table=d;this.$thead=this.$table.find("thead");this.settings=a.extend({},a.tablesort.defaults,c);this.$table.find("th").bind("click.tablesort",function(){e.sort(a(this))});this.direction=this.$th=this.index=null};a.tablesort.prototype={sort:function(d,c){var e=new Date,b=this,g=this.$table,n=0b.value?1*c:a.value -
-
-

Bad Request

-

The request sent to PuppetDB was invalid. This is usually caused by using an unsupported operator.

-
-
- +{% block content %} +

Bad Request

+

The request sent to PuppetDB was invalid. This is usually caused by using an unsupported operator.

{% endblock %} diff --git a/puppetboard/templates/403.html b/puppetboard/templates/403.html index bfe77d0..a5055d3 100644 --- a/puppetboard/templates/403.html +++ b/puppetboard/templates/403.html @@ -1,11 +1,5 @@ {% extends 'layout.html' %} -{% block row_fluid %} -
-
-
-

Permission Denied

-

What you were looking for has been disabled by the administrator.

-
-
-
+{% block content %} +

Permission Denied

+

What you were looking for has been disabled by the administrator.

{% endblock %} diff --git a/puppetboard/templates/404.html b/puppetboard/templates/404.html index e45a201..e9a99ac 100644 --- a/puppetboard/templates/404.html +++ b/puppetboard/templates/404.html @@ -1,11 +1,5 @@ {% extends 'layout.html' %} -{% block row_fluid %} -
-
-
-

Not Found

-

What you were looking for could not be found in PuppetDB.

-
-
-
+{% block content%} +

Not Found

+

What you were looking for could not be found in PuppetDB.

{% endblock %} diff --git a/puppetboard/templates/500.html b/puppetboard/templates/500.html index b79f451..b35ae0f 100644 --- a/puppetboard/templates/500.html +++ b/puppetboard/templates/500.html @@ -1,16 +1,10 @@ {% extends 'layout.html' %} -{% block row_fluid %} -
-
-
-

Internal Server Error

-

This error usually occurs because: -

    -
  • We were unable to reach PuppetDB;
  • -
  • The query to be executed was malformed resulting in an incorrectly encoded request.
  • -

-

Please have a look at the log output for further information.

-
-
-
+{% block content %} +

Internal Server Error

+

This error usually occurs because: +

+

Please have a look at the log output for further information.

{% endblock %} diff --git a/puppetboard/templates/_macros.html b/puppetboard/templates/_macros.html index ba70a69..3c0bad5 100644 --- a/puppetboard/templates/_macros.html +++ b/puppetboard/templates/_macros.html @@ -1,148 +1,148 @@ {% macro facts_table(facts, autofocus=False, condensed=False, show_node=False, show_value=True, link_facts=False, margin_top=20, margin_bottom=20) -%} -
- +
+
- +
{% if show_node %} {% else %} {% endif %} {% if show_value %} {% endif %} {% for fact in facts %} {% if show_node %} {% else %} {% endif %} {% if show_value %} {% endif %} {% endfor %}
NodeFactValue
{{fact.node}}{{fact.name}} {% if link_facts %} {{fact.value}} {% else %} {{fact.value}} {% endif %}
{%- endmacro %} {% macro facts_graph(facts, autofocus=False, condensed=False, show_node=False, margin_top=20, margin_bottom=20) -%} {%- endmacro %} {% macro facts_graph_value(facts, autofocus=False, condensed=False, show_node=False, margin_top=20, margin_bottom=20) -%} {%- endmacro %} {% macro reports_table(reports, nodename, condensed=False, hash_truncate=False, show_conf_col=True, show_agent_col=True, show_host_col=True) -%} -
+
Only showing the last ten reports.
- +
{% if show_conf_col %} {% endif %} {% if show_agent_col %} {% endif %} {% if show_host_col %} {% endif %} {% for report in reports %} {% if hash_truncate %} - {% set rep_hash = "%s…"|format(report.hash_[0:6])|safe %} + {% set rep_hash = "%s…"|format(report.hash_[0:10])|safe %} {% else %} {% set rep_hash = report.hash_ %} {% endif %} {% if report.failed %} {% else %} {% endif %} {% if show_conf_col %} {% endif %} {% if show_agent_col %} {% endif %} {% if show_host_col %} - + {% endif %} {% endfor %}
Start time Run time Full reportConfiguration versionAgent versionHostname
{{report.start}} {{report.run_time}} {{rep_hash}}{{report.version}}{{report.agent_version}}{{nodename}}{{ report.node }}
{%- endmacro %} diff --git a/puppetboard/templates/fact.html b/puppetboard/templates/fact.html index 9950d74..b6a9782 100644 --- a/puppetboard/templates/fact.html +++ b/puppetboard/templates/fact.html @@ -1,12 +1,12 @@ {% extends 'layout.html' %} {% import '_macros.html' as macros %} {% block content %}

{{name}}{% if value %}/{{value}}{% endif %} ({{facts|length}})

-{{macros.facts_graph(facts, autofocus=True, show_node=True, margin_bottom=10)}} -{{macros.facts_graph_value(facts, autofocus=True, show_node=True, margin_bottom=10)}} +{#{{macros.facts_graph(facts, autofocus=True, show_node=True, margin_bottom=10)}}# +{{macros.facts_graph_value(facts, autofocus=True, show_node=True, margin_bottom=10)}}#} {% if value %} {{macros.facts_table(facts, autofocus=True, show_node=True, show_value=False, margin_bottom=10)}} {% else %} {{macros.facts_table(facts, autofocus=True, show_node=True, link_facts=True, margin_bottom=10)}} {% endif %} {% endblock content %} diff --git a/puppetboard/templates/facts.html b/puppetboard/templates/facts.html index 44177ec..98d390c 100644 --- a/puppetboard/templates/facts.html +++ b/puppetboard/templates/facts.html @@ -1,16 +1,16 @@ {% extends 'layout.html' %} {% block content %} -
- +
+
{%- for key,facts_list in facts_dict %} - {{key}} + {{key}}
    {%- for fact in facts_list %}
  • {{fact}}
  • {%- endfor %}
{% endfor %}
{% endblock content %} diff --git a/puppetboard/templates/index.html b/puppetboard/templates/index.html index b144fad..9d1aa20 100644 --- a/puppetboard/templates/index.html +++ b/puppetboard/templates/index.html @@ -1,102 +1,106 @@ {% extends 'layout.html' %} -{% block row_fluid %} -
- -
-
- - -
- -

{{ stats['unreported'] }} - {% if stats['unreported']== 1 %} node {% else %} nodes {% endif %} -

-
- - unreported in the last {{ config.UNRESPONSIVE_HOURS }} hours - -
+{% block content %} +
+ - -
-
-
-

{{metrics['num_nodes']}}

- Population -
-
-

{{metrics['num_resources']}}

- Resources managed -
-
-

{{metrics['avg_resources_node']}}

- Avg. resources/node -
+
+
+

{{metrics['num_nodes']}}

+ Population +
+
+

{{metrics['num_resources']}}

+ Resources managed +
+
+

{{metrics['avg_resources_node']}}

+ Avg. resources/node
- -
-
+
+
+
+
{% if nodes %} -

Nodes status detail ({{nodes|length}})

- - - - - - - - - - {% for node in nodes %} - {% if node.status != 'unchanged' %} - - - - + + + + {% endif %} + {% endfor %} + +
StatusHostname
- - {{node.status}} - - {% if node.status=='unreported'%} - {{ node.unreported_time }} - {% else %} - {% if node.events['failures'] %}{{node.events['failures']}}{% else %}0{% endif%} - {% if node.events['successes'] %}{{node.events['successes']}}{% else %}0{% endif%} - {% endif %} - {{ node.name }} - {% if node.unreported_time != None or node.status != 'unreported' %} - Latest Report +

Nodes status detail ({{nodes|length}})

+ + + + + + + + + + {% for node in nodes %} + {% if node.status != 'unchanged' %} + + - - {% endif %} - {% endfor %} - -
StatusHostname
+ + {{node.status}} + + {% if node.status=='unreported'%} + {{ node.unreported_time }} {% else %} - No Report + {% if node.events['failures'] %}{{node.events['failures']}}{% else %}0{% endif%} + {% if node.events['successes'] %}{{node.events['successes']}}{% else %}0{% endif%} {% endif %} -
+
+ {{ node.name }} + + + + +
{% else %} -

Nodes status detail

-
- Nothing seems to be changing. -
+

Nodes status detail

+
+ Nothing seems to be changing. +
{% endif %}
-{% endblock row_fluid %} +{% endblock content %} diff --git a/puppetboard/templates/layout.html b/puppetboard/templates/layout.html index a49e942..c8fef60 100644 --- a/puppetboard/templates/layout.html +++ b/puppetboard/templates/layout.html @@ -1,67 +1,53 @@ - Puppetᴃoard - - - + Puppetboard + + + + -